# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=python-evdev
pkgver=1.4.0
pkgrel=1
pkgdesc="Python bindings for the Linux input subsystem"
url="https://python-evdev.readthedocs.io/en/latest/"
arch=(x86_64)
license=(BSD)
depends=(python)
makedepends=(git)
_commit=5adc2abf1ec8a02c05c80cb1b3e34ba1d4237803  # tags/v1.4.0^0
source=("git+https://github.com/gvalkov/python-evdev#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  cd $pkgname
  python setup.py build
}

package() {
  cd $pkgname
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE
}
